//
// CommonDefines.h
//
//  WoW Atlas, a World of Warcraft instance map, loot, and achievement browser.
//  Copyright 2010 Steven Mattera <stevenmattera@gmail.com>
//
//	Special Thanks to Dan Gilbert and the Atlas/Atlasloot Team.
//
//	WoW Atlas is free software; you can redistribute it and/or modify
//	it under the terms of the GNU General Public License as published by
//	the Free Software Foundation; either version 2 of the License, or
//	(at your option) any later version.
//
//	WoW Atlas is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRENTY; without even the implied warrenty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//	GNU General Public License for more deails.
//
//	You should have received a copy of the GNU General Public License
//	along with WoW Atlas; if not, write to the Free Software
//	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//

#include <CoreGraphics/CoreGraphics.h>

#define LocStr(key) [[NSBundle mainBundle] localizedStringForKey:(key) value:@"" table:nil]

#define getDefaultObject(key) [[NSUserDefaults standardUserDefaults] objectForKey:(key)]
#define getDefaultString(key) [[NSUserDefaults standardUserDefaults] objectForKey:(key)]
#define getDefaultInteger(key) [[NSUserDefaults standardUserDefaults] integerForKey:(key)]
#define getDefaultFloat(key) [[NSUserDefaults standardUserDefaults] floatForKey:(key)]
#define getDefaultBool(key) [[NSUserDefaults standardUserDefaults] boolForKey:(key)]

#define setDefaultObject(object, key) [[NSUserDefaults standardUserDefaults] setObject:(object) forKey:(key)]
#define setDefaultString(string, key) [[NSUserDefaults standardUserDefaults] setObject:(string) forKey:(key)]
#define setDefaultInteger(int, key) [[NSUserDefaults standardUserDefaults] setInteger:(int) forKey:(key)]
#define setDefaultFloat(float, key) [[NSUserDefaults standardUserDefaults] setFloat:(float) forKey:(key)]
#define setDefaultBool(bool, key) [[NSUserDefaults standardUserDefaults] setBool:(bool) forKey:(key)]

#define synchronizeDefaults() [[NSUserDefaults standardUserDefaults] synchronize]

void CGContextAddRoundRect(CGContextRef context, CGRect rect, CGFloat cornerRad);
